package com.hex.ds.hdrs.period.job.service;

import com.hex.ds.hdrs.period.job.dao.PeriodJobHisDao;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.Map;

/**
 * @Package: com.hex.ds.hdrs.period.job.service
 * @ClassName PeriodJobHisService
 * @Description:周期作业实例历史数据处理层
 * @Author: <gc.zuo>
 * @Date 2021/6/3 16:18
 * @Version v1.0
 **/
@Slf4j
@Service
public class PeriodJobHisService {

    @Autowired
    private PeriodJobHisDao periodJobHisDao;

    /**
     * @Method: addJobHis <br>
     * @Param: [map] <br>
     * @Return: void <br>
     * @Description：进行周期作业实例备份<br>
     * @Author： gc.zuo<br>
     * @Date： 2021/6/3 16:18 <br>
     * @Version： V1.0<br>
     */
    public void addJobHis(Map map) {
        this.periodJobHisDao.add(map);
    }

    /**
     * @Method: delByBitchId <br>
     * @Param: [bitchId] <br>
     * @Return: void <br>
     * @Description：根据批次号删除历史表数据<br>
     * @Author： gc.zuo<br>
     * @Date： 2021/6/3 16:18 <br>
     * @Version： V1.0<br>
     */
    public void delByBitchId(String bitchId) {
        Map map = new HashMap(16);
        map.put("bitchId", bitchId);
        this.periodJobHisDao.delByBitchId(map);
    }
}
